home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Games / MAME / src / sound / upd7759.h < prev    next >
C/C++ Source or Header  |  2000-04-04  |  1KB  |  43 lines

  1. #ifndef UPD7759S_H
  2. #define UPD7759S_H
  3.  
  4. #define MAX_UPD7759 2
  5.  
  6. /* There are two modes for the uPD7759, selected through the !MD pin.
  7.    This is the mode select input.  High is stand alone, low is slave.
  8.    We're making the assumption that nobody switches modes through
  9.    software. */
  10.  
  11. #define UPD7759_STANDALONE_MODE     1
  12. #define UPD7759_SLAVE_MODE            0
  13.  
  14. #define UPD7759_STANDARD_CLOCK 640000
  15.  
  16. struct UPD7759_interface
  17. {
  18.     int num;        /* num of upd chips */
  19.     int clock_rate;
  20.     int volume[MAX_UPD7759];
  21.     int region[MAX_UPD7759];     /* memory region from which the samples came */
  22.     int mode;        /* standalone or slave mode */
  23.     void (*irqcallback[MAX_UPD7759])(int param);    /* for slave mode only */
  24. };
  25.  
  26. int UPD7759_sh_start (const struct MachineSound *msound);
  27. void UPD7759_sh_stop (void);
  28.  
  29. void UPD7759_reset_w (int num, int data);
  30. void UPD7759_message_w (int num, int which);
  31. void UPD7759_start_w (int num, int playback);
  32. int UPD7759_busy_r (int num);
  33. int UPD7759_data_r (int num, int offs);
  34.  
  35. WRITE_HANDLER( UPD7759_0_message_w );
  36. WRITE_HANDLER( UPD7759_0_start_w );
  37. READ_HANDLER( UPD7759_0_busy_r );
  38. READ_HANDLER( UPD7759_0_data_r );
  39. READ_HANDLER( UPD7759_1_data_r );
  40.  
  41. #endif
  42.  
  43.